using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Wys.EnlishVoice;
namespace TestApp
{
    public partial class Form1 : Form
    {
        String str = @"Data Source = D:\EnlishVoice\TestApp\bin\Debug\DB\ENGLISHWORD.db";
        private EnglishWord24 _EnglishWord24 = null;
        public Form1()
        {
            InitializeComponent();
            _EnglishWord24 = EnglishWord24.GetInstance(str);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (this.txtWord.Text.Trim() != "")
            {
                this.Text = _EnglishWord24.GetMp3Path(this.txtWord.Text.Trim(),"0");
                _EnglishWord24.SoundWord(this.txtWord.Text.Trim());
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            this.txtWord.Focus();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            using (ProjectForm frm = new ProjectForm(str,"1"))
            {
                frm.ShowDialog();
            }
        }

        private void button3_Click(object sender, EventArgs e)
        {
            using (PreviewDataForm frm = new PreviewDataForm(str))
            {
                frm.ShowDialog();
            }
        }
    }
}